module.exports = {
  transpileDependencies: ['@dcloudio/uni-ui', 'uview-ui'],
  chainWebpack: (config) => {
    // 处理静态资源
    config.module
      .rule('images')
      .test(/\.(png|jpe?g|gif|webp|svg)(\?.*)?$/)
      .use('url-loader')
      .loader('url-loader')
      .options({
        limit: 4096,
        fallback: {
          loader: 'file-loader',
          options: {
            name: 'static/img/[name].[hash:8].[ext]',
            publicPath: '/'
          }
        }
      });
  }
}